#include <iostream>
#include <stdio.h>
#include <string>
#include <typeinfo>

using namespace std;

int add(int a, int b ,int c){
    return a+b;
}

class Cat{
public:
    // 静态成员变量
    static int no;
    int id = 0;
    int mouse = 1;
    int tail = 1;
    int nose = 1;
    Cat(){
        // 静态变量类内共享
        id = no++;
    }
    string eat(){
        return "yam, yam";
    }
};

// 静态成员变量必须初始化
int Cat::no = 0;

int main() {
    Cat* p = new Cat[10];   // id 0 -- 9
    Cat* q = new Cat[5];    // id 10 -- 14
    int n = 4;
    cout <<"cat "<< n <<" id: "<< q[n].id;
    return 0;
}